﻿namespace HiMap.Carto
{
    using HiMap.Base;
    using System;
    using System.Text;

    public abstract class ClassClass : HiMapPtrClass, IClass, IHiMapPtr
    {
        protected ClassClass()
        {
        }

        ~ClassClass()
        {
            if (!base.m_Used)
            {
                VC.KWG_LAYER_DELETE(base.m_InPtr);
            }
        }

        string IClass.Caption
        {
            get
            {
                StringBuilder builder = new StringBuilder(0xff);
                VC.KWG_LAYER_GET_CAPTION(base.m_InPtr, builder);
                return builder.ToString();
            }
        }

        string IClass.DataSource
        {
            get
            {
                return "";
            }
        }

        string IClass.Name
        {
            get
            {
                StringBuilder builder = new StringBuilder(0xff);
                VC.KWG_LAYER_GET_NAME(base.m_InPtr, builder);
                return builder.ToString();
            }
        }

        ClassType IClass.Type
        {
            get
            {
                return (ClassType) VC.KWG_LAYER_GET_TYPE(base.m_InPtr);
            }
        }
    }
}

